Skip to content

Clean up contrib/python; move llm-auditor to contrib; add retail plugin README - #2756

Merged
happyhuman merged 8 commits into
google:mainfrom
pierpaolo28:remove-undeployable-and-move-llm-auditor
Oct 2, 2026
Merged

happyhuman merged 8 commits into
google:mainfrom
pierpaolo28:remove-undeployable-and-move-llm-auditor

Conversation

@pierpaolo28

@pierpaolo28 pierpaolo28 commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Removes 4 contrib/python/ recipes that fail the Recipe Checklist §1 deployability requirement (no root Dockerfile, no deployable: true in manifest.yaml):
    • contrib/python/attenu-guard-customer-service
    • contrib/python/clause-agent
    • contrib/python/cross-border-data-router
    • contrib/python/market-research-agent
  • Moves core/kotlin/llm-auditor → contrib/kotlin/llm-auditor. It combines multi-agent orchestration, Google Search tool use, and callbacks — past the "focused, single-pattern" bar documented for core/. It fits well next to contrib/kotlin/financial-advisor.
  • Updates in-recipe path references in the moved recipe's README.md and AGENTS.md to the new location. Package names, ownership (team: adk-kotlin, poc: sherryfox), source, and tests are preserved verbatim.
  • Adds plugins/retail/README.md orienting readers to the two bundled skills (retail-product-search, retail-virtual-tryon), their Google Cloud services, install options, and companion deployable recipes under contrib/python/retail-*. Docs-only.
  • Trims the H1 in contrib/python/retail-virtual-tryon/README.md to drop the redundant folder path (GitHub already shows it above the file).

Rationale

The Recipe Checklist (§1 — Always) requires every contrib/ recipe to ship with a root Dockerfile and deployable: true. None of the four removed recipes satisfy this today. Rather than retrofit them, this PR removes them so the contrib/ index reflects only deployable recipes.

For llm-auditor, the demotion from core/ to contrib/ is a scope/quality call, not a correctness one — the recipe itself is sound; it just teaches more than one thing.

The plugins/retail/ directory had no vertical-level README. The new file is pure orientation: table of skills, install snippets, pointers to the per-skill SKILL.md/README.md and to the deployable companion recipes.

Out of scope / flagged for maintainers

A few .github/ references to the old core/kotlin/llm-auditor path remain:

  • .github/ISSUE_TEMPLATE/bug_report.md:12 — uses the old path as an example.
  • .github/scripts/recipe_images_matrix.py:51 and .github/scripts/tests/test_recipe_images_matrix.py — docstring/test assertion that core/kotlin/llm-auditor and contrib/python/llm-auditor "coexist today".
  • .github/scripts/tests/test_check_recipe_lint_config.py:332-334 — pytest fixture that pytest.skips when the path isn't present (so this degrades gracefully but silently stops exercising the real recipe).

Per AGENTS.md (stay inside the task's directory; flag external issues) these are left for a maintainer to resolve.

Test plan

  • CI validate passes on contrib/kotlin/llm-auditor (uv run validate contrib/kotlin/llm-auditor).
  • CI validate placement no longer sees the removed contrib/python/* recipes.
  • .github/scripts/tests/test_check_recipe_lint_config.py still passes (test skips when the old core/kotlin/llm-auditor path is absent).
  • test_recipe_images_matrix.py fixture-based tests still pass (they construct recipes in tmp_path, not on disk).
  • plugins/retail/README.md renders correctly on GitHub; relative links to skill subdirs and companion contrib/python/retail-* recipes resolve.
  • contrib/python/retail-virtual-tryon/README.md renders with the trimmed H1.

@google-cla

google-cla Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Ready for review. All checks pass and the review comments are resolved.

Re-requested review from happyhuman.

Removes four `contrib/python/` recipes that do not meet the contrib
deployability requirement (no root `Dockerfile`, no `deployable: true`
in `manifest.yaml`), per the Recipe Checklist (§1):

- contrib/python/attenu-guard-customer-service
- contrib/python/clause-agent
- contrib/python/cross-border-data-router
- contrib/python/market-research-agent

Moves `core/kotlin/llm-auditor` to `contrib/kotlin/llm-auditor`. It
combines multi-agent orchestration, Google Search tool use, and
callbacks, which goes past the "focused, single-pattern" bar for
`core/`. The recipe is community-ready and fits better alongside
`contrib/kotlin/financial-advisor`. In-recipe path references in
README.md and AGENTS.md are updated to the new location.
@pierpaolo28
pierpaolo28 force-pushed the remove-undeployable-and-move-llm-auditor branch from 6351c22 to d02aae1 Compare October 2, 2026 19:02
Orients readers landing on `plugins/retail/`: summarises the two
bundled skills (product-search, virtual-tryon), their Google Cloud
services, how to install them (`npx skills add` or `make surface`),
and points to the deployable companion recipes under
`contrib/python/retail-*`. No functional changes.
@pierpaolo28 pierpaolo28 changed the title Remove 4 non-deployable python recipes; move llm-auditor to contrib Clean up contrib/python; move llm-auditor to contrib; add retail plugin README Oct 2, 2026
The H1 duplicated the folder path, which GitHub already shows above
the file. Shortens to just the recipe name.
Adds a root `Dockerfile` and `deployable: true` to `manifest.yaml` so
the recipe satisfies the Recipe Checklist §1 requirement for every
`contrib/` recipe. The Dockerfile mirrors `contrib/kotlin/financial-advisor`
(Gradle `installDist` build stage, JRE-only run stage, non-root user,
HOST/PORT envs for WebMain), swapping only the `installDist` output
directory name (`llm-auditor`) and the main class
(`com.google.adk.samples.agents.llmauditor.WebMainKt`).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Security review — 1 finding(s).


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

Comment thread contrib/kotlin/llm-auditor/Dockerfile Resolved
LlmAuditorAgent is a Kotlin `object`, so its `private val model = Gemini(...)`
runs at class-load. Gemini() refuses to construct without auth config, which
caused the container to crash on startup with ExceptionInInitializerError.
Mirror contrib/kotlin/financial-advisor's .env.example (Vertex-first,
GOOGLE_API_KEY placeholder for the Gemini-API path).
Direct `Gemini(...)` construction inside the LlmAuditorAgent object
runs at class-load and validates auth up front — so the container
crashed on startup with ExceptionInInitializerError whenever
credentials weren't baked in. Mirrors the pattern used by
`contrib/kotlin/financial-advisor`:

- Port `Models.kt` (LazyModel wrapper + .env loader + Vertex/Gemini
  branch, TODO placeholders detected as "unset").
- `LlmAuditorAgent` uses `Models.fromEnvironment()`.
- `CriticAgent` / `ReviserAgent` take `Model` instead of `Gemini`.
- `WebMain` honors HOST/PORT so the container binds 0.0.0.0.
- `.env.example` declares MODEL_NAME=gemini-flash-latest (preserves
  the previously hardcoded model name verbatim) and the auth env vars.
- Dockerfile no longer `COPY`s .env (addresses the [MAJOR] inline
  reviewer comment about baking placeholder config into the image).
  MODEL_NAME is set as a Dockerfile ENV default — not a credential,
  just the recipe's model identifier, overridable at deploy time.
The ported Models.kt references kotlinx.coroutines.flow.Flow, which
isn't on the compile classpath at adk 0.9.0. Rather than paper over
with an explicit coroutines pin (and risk a version mismatch against
whatever ADK brings transitively), move to adk 1.2.0 + Kotlin 2.3.20
+ Java 17 source/target compatibility — the same stack the sibling
financial-advisor recipe uses successfully.

Also drops the KSP plugin + processor dependency (not used by any
llm-auditor source file; the processor was 0.9.0-era boilerplate),
and swaps the test env from GOOGLE_API_KEY (no longer needed thanks
to lazy model construction) to MODEL_NAME.
@github-actions github-actions Bot removed the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 2, 2026
@happyhuman
happyhuman merged commit 0521e23 into google:main Oct 2, 2026
38 checks passed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Security review — 1 finding(s).


Round 2 · 1 of this PR's 25 automated comments used · this round is capped at 1 across all reviewers · after this round only Security and Correctness run.

GOOGLE_CLOUD_LOCATION=global
GOOGLE_API_KEY=<TODO: update-this-value>

MODEL_NAME=gemini-flash-latest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MAJOR] Perhaps we should use the default gemini-3.7-flash instead of gemini-flash-latest here and in two other places, as recommended in AGENTS.md:40?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants